function A311()
    % 设置长格式输出
    format long;
    % 提升小波在时域中采用提升方法构造第二代小波。
    % 读取Excel文件
    data_single = readtable('A3_data_single.xlsx');  % 读取单排钢筋信号数据
    data_double = readtable('A3_data_double.xlsx');  % 读取双排钢筋信号数据

    % 提取第150列数据（单排钢筋信号和双排钢筋信号）
    yRebar = data_single{:, 150};  % 读取单排钢筋衬砌信号
    yVoid = data_double{:, 150};  % 读取双排钢筋衬砌信号

    % 绘制原始信号
    figure;
    subplot(3, 1, 1);
    plot(yRebar, 'r');
    hold on;
    plot(yVoid, 'b');
    hold off;
    title('原始信号对比');
    legend('单排钢筋信号', '双排钢筋信号');
    ylabel('振幅');
    xlabel('样本点');
    axis tight;

    % 创建提升小波方案
    wv = 'db4';  % 使用 Daubechies 4 小波
    lsc = liftingScheme('Wavelet', wv);

    % 对双排信号进行提升小波分解
    [ca_double, cd_double] = lwt(yVoid, 'LiftingScheme', lsc);

    % 对单排信号进行提升小波分解
    [ca_single, cd_single] = lwt(yRebar, 'LiftingScheme', lsc);

    % 提取第1级近似分量（低频信息）
    approxCf_double_1 = lwtcoef(ca_double, cd_double, 'LiftingScheme', lsc, 'OutputType', 'coefficients', 'Level', 1);
    approxCf_single_1 = lwtcoef(ca_single, cd_single, 'LiftingScheme', lsc, 'OutputType', 'coefficients', 'Level', 1);

    % 提取第2级近似分量（更低频信息）
    approxCf_double_2 = lwtcoef(ca_double, cd_double, 'LiftingScheme', lsc, 'OutputType', 'coefficients', 'Level', 2);
    approxCf_single_2 = lwtcoef(ca_single, cd_single, 'LiftingScheme', lsc, 'OutputType', 'coefficients', 'Level', 2);

    % 计算第1级和第2级近似分量的差值
    approxCf_diff_1 = approxCf_double_1 - approxCf_single_1;
    approxCf_diff_2 = approxCf_double_2 - approxCf_single_2;

    % 绘制第1级近似分量
    subplot(3, 1, 2);
    plot(approxCf_double_1, 'r');
    hold on;
    plot(approxCf_single_1, 'b');
    hold off;
    title('第1级近似分量对比');
    legend('双排 - 级别1近似', '单排 - 级别1近似');
    ylabel('振幅');
    xlabel('样本点');
    axis tight;

    % 绘制第2级近似分量
    figure;
    plot(approxCf_double_2, 'r');
    hold on;
    plot(approxCf_single_2, 'b');
    hold off;
    title('第2级近似分量对比');
    legend('双排 - 级别2近似', '单排 - 级别2近似');
    ylabel('振幅');
    xlabel('样本点');
    axis tight;

    % 绘制第1级近似系数差值
    figure;
    plot(approxCf_diff_1, 'k');
    title('第1级近似系数差值');
    xlabel('样本点');
    ylabel('振幅差值');
    axis tight;

    % 绘制第2级近似系数差值
    figure;
    plot(approxCf_diff_2, 'k');
    title('第2级近似系数差值');
    xlabel('样本点');
    ylabel('振幅差值');
    axis tight;

    % 提取并绘制各级细节分量的差值
    levels = [1, 2, 3];  % 分解级别
    figure;
    hold on;
    colors = ['r', 'g', 'b'];  % 使用红、绿、蓝分别表示不同级别
    for i = 1:length(levels)
        level = levels(i);

        % 提取细节分量
        detail_double = lwtcoef(ca_double, cd_double, 'LiftingScheme', lsc, 'OutputType', 'coefficients', 'Level', level, 'Type', 'detail');
        detail_single = lwtcoef(ca_single, cd_single, 'LiftingScheme', lsc, 'OutputType', 'coefficients', 'Level', level, 'Type', 'detail');

        % 计算差值
        detail_diff = detail_double - detail_single;

        % 绘制差值分量
        plot(detail_diff, colors(i), 'DisplayName', ['差值 - 级别 ', num2str(level), ' 细节']);
    end
    hold off;
    legend;
    title('各级别细节分量差值');
    xlabel('样本点');
    ylabel('振幅差值');
    axis tight;

    % 展示每级的细节系数图
    figure;
    for i = 1:length(levels)
        level = levels(i);

        % 提取细节分量
        detail_double = lwtcoef(ca_double, cd_double, 'LiftingScheme', lsc, 'OutputType', 'coefficients', 'Level', level, 'Type', 'detail');
        detail_single = lwtcoef(ca_single, cd_single, 'LiftingScheme', lsc, 'OutputType', 'coefficients', 'Level', level, 'Type', 'detail');

        % 绘制双排信号的细节分量
        subplot(length(levels), 3, (i - 1) * 3 + 1);
        plot(detail_double);
        title(['双排 - 级别 ', num2str(level), ' 细节']);
        ylabel('振幅');
        xlabel('样本点');
        axis tight;

        % 绘制单排信号的细节分量
        subplot(length(levels), 3, (i - 1) * 3 + 2);
        plot(detail_single);
        title(['单排 - 级别 ', num2str(level), ' 细节']);
        ylabel('振幅');
        xlabel('样本点');
        axis tight;

        % 绘制细节分量的差值
        subplot(length(levels), 3, (i - 1) * 3 + 3);
        plot(detail_double - detail_single);
        title(['差值 - 级别 ', num2str(level), ' 细节']);
        ylabel('振幅');
        xlabel('样本点');
        axis tight;
    end
end
